[PR]

水無瀬の部屋 > Programming > sample > tools > header > toolsys.h
最終更新日: 2007/03/29

   1: //*********************************************************
   2: // プロジェクト: TOOLS
   3: //  ファイル名: toolsys.h
   4: //*********************************************************
   5: #ifndef TOOLSYS_HEAD_INCLUDED // 多重インクルードの防止
   6: #define TOOLSYS_HEAD_INCLUDED
   7: 
   8: 
   9: //*********************************************************
  10: // コンパイル環境の指定
  11: //*********************************************************
  12: #ifndef PRIVATE_TOOLS_HEAD_INCLUDED // 冗長ガード
  13: #include <header/_tools.h>
  14: #ifndef PRIVATE_TOOLS_HEAD_INCLUDED // ガード名の検査
  15: #error "? PRIVATE_TOOLS_HEAD_INCLUDED"
  16: #endif // #ifndef PRIVATE_TOOLS_HEAD_INCLUDED
  17: #endif // #ifndef PRIVATE_TOOLS_HEAD_INCLUDED
  18: 
  19: 
  20: //*********************************************************
  21: // マクロ の 定義
  22: //*********************************************************
  23: // [仮] レジストリ・パス の 最大長
  24: #define MAX_REGPATH     ( MAX_PATH )
  25: #define MAX_REGPATH_BUF ( 2 * (1 + MAX_REGPATH) )
  26: 
  27: // 関数 ShellExecute(), ShellExecuteEx() の成功判定
  28: #define  SHELLEXECUTE_SUCCEEDED( h ) ( 32 < _w64_reinterpret_cast<INT_PTR>(static_cast<HINSTANCE>(h)) )
  29: 
  30: // シェルの拡張
  31: #if (_WIN32_IE < 0x0400)
  32: #define CMIC_MASK_PTINVOKE      ( 0x20000000 )
  33: #define IDC_OFFLINE_HAND        ( 103 )
  34: #define SHCNE_EXTENDED_EVENT    ( 0x04000000L )
  35: #define SHCNEE_ORDERCHANGED     ( 0x00000002L )  // dwItem2 is the pidl of the changed folder
  36: #endif // #if (_WIN32_IE < 0x0400)
  37: 
  38: //
  39: #if (_WIN32_WINNT < 0x0400)
  40: #define WM_MOUSEWHEEL                  ( 0x020A )
  41: #define WHEEL_DELTA                    ( 120 )    // Default value for rolling one notch
  42: #define SPI_GETWHEELSCROLLLINES        ( 0x0068 )
  43: #define SPI_SETWHEELSCROLLLINES        ( 0x0069 )
  44: #define WHEEL_PAGESCROLL               ( 0xFFFF ) // signifies to scroll a page, also defined in winuser.h in the NT4.0 SDK
  45: #define GET_WHEEL_DELTA_WPARAM(wParam) ( (short)HIWORD(wParam) )
  46: #endif // #if (_WIN32_WINNT < 0x0400)
  47: 
  48: 
  49: 
  50: //*********************************************************
  51: // 関数 の 宣言
  52: //*********************************************************
  53: #ifdef __cplusplus
  54: extern "C" {
  55: #endif
  56: 
  57: 
  58: // toolsys.cpp
  59: // a
  60: bool            AddNotifyIcon( NOTIFYICONDATA *nid );
  61: bool            AddNotifyIconRetry( NOTIFYICONDATA *nid, int count, int interval );
  62: void           *AllocClipboardData( HWND hwndOwner, UINT uFormat );
  63: void           *AllocRegKeyData( HKEY hKey, const char *name );
  64: char           *AllocRegKeyString( HKEY hKey, const char *name );
  65: 
  66: // b
  67: HANDLE          BeginThreadEx( SECURITY_ATTRIBUTES *pAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE ThreadFunc, void *pParam, DWORD dwFlags, DWORD *dwID );
  68: 
  69: // c
  70: bool            ClearClipboardData( HWND hwndOwner );
  71: bool            CloseRegKey( HKEY hKey );
  72: HCURSOR         CreateHandCursor( HINSTANCE hInstance );
  73: HANDLE          CreateMutexOnce( const char *MutexName );
  74: HCURSOR         CreateNoDropCursor( HINSTANCE hInstance );
  75: NOTIFYICONDATA *CreateNotifyIconData( HWND hWnd, UINT uID, UINT uMessage, HICON hIcon, const char *szTip );
  76: bool            CreateRegKey( HKEY hkeyRoot, const char *name, REGSAM samDesired, HKEY *hKey );
  77: bool            CreateShellLinkFile( DWORD dwClsContext, const char *lnkname, const char *path, const char *param, const char *work, int nShowCmd, bool bRemember );
  78: IShellLink     *CreateShellLinkInstance( DWORD dwClsContext );
  79: IShellLink     *CreateShellLinkInstanceEx( DWORD dwClsContext, const char *path, const char *param, const char *work, int nShowCmd );
  80: FILE           *CreateTemporaryFile( char *path, int bufsize, const char *mode );
  81: bool            CursorInRect( const RECT *rect );
  82: 
  83: // d
  84: bool            DeleteNotifyIcon( NOTIFYICONDATA *nid );
  85: bool            DeleteRegKey( HKEY hKey, const char *name );
  86: bool            DrawLine( HDC hDC, POINT ptFrom, POINT ptTo );
  87: bool            DuplicateDirectory( const char *TemplateDirectory, const char *NewDirectory, SECURITY_ATTRIBUTES *pSecurity );
  88: 
  89: // e
  90: bool            EnumFile( const char *path, const char *mask, bool (CALLBACK *)(const char *, const WIN32_FIND_DATA *, void *), void *param );
  91: bool            EnumLogicalDrives( bool (CALLBACK *)(const char *, void *), void *param );
  92: bool            EnumRegKey( HKEY hKey, DWORD index, char *buffer, DWORD bufsize );
  93: bool            EnumRegValueName( HKEY hKey, DWORD index, char *buffer, DWORD bufsize );
  94: 
  95: // f
  96: HWND            FindShellTrayWnd( void );
  97: DWORD           fsize( const char *path, DWORD *dwSizeHigh );
  98: 
  99: // g
 100: bool            GetClientCursorPos( HWND hWnd, POINT *pt );
 101: void           *GetCreateParam( LPARAM lParam );
 102: DWORD           GetCurrentProcessPriorityClass( void );
 103: bool            GetFileInformation( const char *path, WIN32_FIND_DATA *winfd );
 104: bool            GetFreeResource( int *nSystem, int *nGdi, int *nUser );
 105: bool            GetLocalFileTime( FILETIME *ft );
 106: bool            GetLongFileName( const char *shortname, char *longname, DWORD bufsize );
 107: bool            GetModuleFile( char *buffer, int bufsize, const char *extension );
 108: bool            GetModuleFileLocation( char *buffer, int bufsize );
 109: void           *GetModuleFileVersionInfo( HINSTANCE hInstance, DWORD **dwTrans );
 110: bool            GetQuickLaunchDirectory( char *buffer, size_t bufsize );
 111: bool            GetRegKeyData( HKEY hKey, const char *name, void *buffer, DWORD bufsize );
 112: bool            GetRegKeyDataSize( HKEY hKey, const char *name, DWORD *size );
 113: bool            GetRegKeyDataType( HKEY hKey, const char *name, DWORD *type );
 114: bool            GetRegKeyString( HKEY hKey, const char *name, char *buffer, DWORD bufsize );
 115: bool            GetSpecialFolder( HWND hWnd, int nFolder, char *path, int bufsize );
 116: void           *GetVersionInfo( const char *FullPath, DWORD **dwTrans );
 117: bool            GetVersionValue( char *buffer, int bufsize, void *block, DWORD dwTrans, const char *keyword );
 118: int             GetVirtualKeyNameText( char *buffer, int bufsize, UINT vkey, bool extend );
 119: bool            GetVolumeName( const char *root, char *buffer, DWORD bufsize );
 120: 
 121: // h
 122: // i
 123: bool            IME_Enable( HWND hWnd, bool bEnable );
 124: bool            IME_IsEnabled( HWND hWnd );
 125: bool            IME_SetCompositionWindowPos( HIMC hIMC, POINT *ptPos );
 126: bool            IsPathDirectory( const char *path );
 127: bool            IsPathExist( const char *path );
 128: bool            IsPathFile( const char *path );
 129: bool            IsPathMyself( const char *path );
 130: bool            IsRegKeyExist( HKEY hkeyRoot, const char *name );
 131: bool            IsSignalObject( HANDLE handle );
 132: bool            IsValidBitmapHandle( HBITMAP hBitmap );
 133: bool            IsValidBrushHandle( HBRUSH hBrush );
 134: bool            IsValidCursorHandle( HCURSOR hCursor );
 135: bool            IsValidDeviceContextHandle( HDC hDC );
 136: bool            IsValidDialogTemplate( const DLGTEMPLATE *dlg );
 137: bool            IsValidDialogItemTemplate( const DLGITEMTEMPLATE *item );
 138: bool            IsValidFontHandle( HFONT hFont );
 139: bool            IsValidGlobalMemoryHandle( HGLOBAL hGlobal, DWORD size );
 140: bool            IsValidIconHandle( HICON hIcon );
 141: bool            IsValidInstanceHandle( HINSTANCE hInstance );
 142: bool            IsValidLocalMemory( HLOCAL hLocal );
 143: bool            IsValidLocalMemoryEx( HLOCAL hLocal, int nMinSize, int nMaxSize );
 144: bool            IsValidMemoryDeviceContextHandle( HDC hMemDC );
 145: bool            IsValidMutexName( const char *name );
 146: bool            IsValidNotifyIconData( const NOTIFYICONDATA *nid );
 147: bool            IsValidRegistryKeyName( const char *name );
 148: bool            IsValidRegistryValueName( const char *name );
 149: bool            IsValidRegKeyHandle( HKEY hKey );
 150: bool            IsValidResourceName( const char *name );
 151: 
 152: // j
 153: // k
 154: // l
 155: HICON           LoadIconImage( HINSTANCE hInstance, const char *IconName, int Width, int Height, UINT Flags );
 156: bool            LoadShellLink( IShellLink *psl, const WCHAR *wcLinkName, DWORD dwMode );
 157: IShellLink     *LoadShellLinkInstance( DWORD dwClsContext, const char *path, DWORD dwMode );
 158: 
 159: // m
 160: bool            MakeDialogTemplate( DLGTEMPLATE *dlg, WORD count, DWORD dwStyleEx, DWORD dwStyle, short x, short y, short cx, short cy );
 161: bool            MakeDialogItemTemplate( DLGITEMTEMPLATE *item, WORD wID, DWORD dwStyleEx, DWORD dwStyle, short x, short y, short cx, short cy );
 162: bool            MakeNotifyIconData( NOTIFYICONDATA *nid, HWND hWnd, UINT uID, UINT uMessage, HICON hIcon, const char *szTip );
 163: bool            ModifyNotifyIcon( NOTIFYICONDATA *nid );
 164: bool            MoveFileToRecycleBin( HWND hWnd, const char *pFrom, WORD wFlags );
 165: 
 166: // n
 167: // o
 168: bool            OpenFileLocation( HWND hWnd, const char *filepath, int nShow );
 169: bool            OpenRegKey( HKEY hkeyRoot, const char *name, REGSAM samDesired, HKEY *hKey );
 170: bool            OpenSpecialFolder( HWND hWnd, int nID, int nShow );
 171: HANDLE          OpenWindowProcess( HWND hWnd, DWORD dwFlag, bool bInherit );
 172: 
 173: // p
 174: bool            PrivateProfile_DeleteKey( const char *filename, const char *section, const char *key );
 175: bool            PrivateProfile_DeleteSection( const char *filename, const char *section );
 176: bool            PrivateProfile_IsExistKey( const char *filename, const char *section, const char *key );
 177: bool            PrivateProfile_ReadBoolean( const char *filename, const char *section, const char *key, bool defval );
 178: int             PrivateProfile_ReadInteger( const char *filename, const char *section, const char *key, int defval );
 179: bool            PrivateProfile_WriteBoolean( const char *filename, const char *section, const char *key, bool value );
 180: bool            PrivateProfile_WriteInteger( const char *filename, const char *section, const char *key, int value );
 181: bool            PrivateProfile_WriteString( const char *filename, const char *section, const char *key, const char *string );
 182: 
 183: // q
 184: // r
 185: // s
 186: bool            SaveShellLink( IShellLink *psl, const char *wcLinkName, bool bRemember );
 187: bool            SaveShellLinkW( IShellLink *psl, const WCHAR *wcLinkName, bool bRemember );
 188: bool            SetClipboardText( HWND hwndOwner, const char *string );
 189: bool            SetCurrentProcessPriorityClass( DWORD dwPriorityClass );
 190: bool            SetWallPaperFile( const char *filename, UINT flags );
 191: bool            SetRegKeyString( HKEY hKey, const char *name, const char *string );
 192: IPersistFile   *ShellLink_QueryPersistFileInterface( IShellLink *psl );
 193: HICON           SHGetFileIcon( const char *FileName, UINT uFlags );
 194: HICON           SHGetInstanceIcon( HINSTANCE hInstance, UINT uFlags );
 195: 
 196: // t
 197: // u
 198: bool            UpdateNotifyIcon( NOTIFYICONDATA *nid );
 199: 
 200: // v
 201: // w
 202: // x
 203: // y
 204: // z
 205: 
 206: 
 207: #ifdef __cplusplus
 208: } // extern "C"
 209: #endif
 210: 
 211: 
 212: #endif // #ifndef TOOLSYS_HEAD_INCLUDED
 213: 
 214: 
 215: //** end **
 216: 

参照: lnkctrl.cpp, dyndlg.cpp, pathargv.cpp, toolold.cpp, susie.cpp, toolctrl.cpp, tools.h, toolsys.cpp, toolsysx.cpp, toolwind.cpp, workthrd.cpp


Google
ご意見・ご感想をお聞かせ下さい。匿名で送信できます。

 * 返信が必要な場合には postmaster@katsura-kotonoha.sakura.ne.jp へ直接メールしてください。

水無瀬の部屋 > sample > tools > header > toolsys.h

このページは cpp2web が出力しました。
水無瀬 優 postmaster@katsura-kotonoha.sakura.ne.jp
http://katsura-kotonoha.sakura.ne.jp/prog/code/tools/header/toolsys_h.shtml
>> Amazon.co.jp 『たまゆら童子』 へ
>> 楽天ブックス 『たまゆら童子』 へ